<?php
	$con=mysqli_connect('localhost', 'root', '', 'friday');
	if($con){
		mysqli_set_charset($con,'utf8');   
	   $sql4="select * from dingdan";
	   $result4=mysqli_query($con,$sql4);
	   $arr2=mysqli_fetch_all($result4,MYSQLI_ASSOC);
	   $str=json_encode($arr2);
	   echo $str;	
	}else {
		echo "链接未遂".mysqli_connect_error();
	}
	
	mysqli_close($con);

	?>